<case value="project">
	<input id="project_text" type="hidden" name="{$[type]form.name}" value="{$[type]form.value}"/>
	<php>
		if($form['value']){
			$usrename = M('project')->where("id=$form[value]")->getField('project_number');
			
		}
	</php>
 	
 <input type="text"  class="form-control input text" name="{$[type]form.name}_num" value="{$usrename}" onblur="get_project_id(this.value);" {$[type]form.extra_attr}>		
 

    	<script>
    		function get_project_id(project){
    			$.ajax({
				   type: "POST",
				   url: "{:U('/admin/ajax/get_project_id')}",
				   data: "project_number="+project,
				   success: function(msg){
				     $("#project_text").val(msg);
				   }
				});
    		}
    	</script>
</case>